const {addUser, deleteUser} = require("./PublicExampleUserApi")

/**
 * 通过 async 和 await 来替换 myRun.js
 * */
async function createUserThenDeleteIt(userId) {
    const promiseResult1 = await addUser(userId)

    const rowId = promiseResult1.data.id
    console.log("新增的用户",userId,"是：", promiseResult1.data)
    const promiseResult2 = await deleteUser(rowId)
    console.log("删除用户的",userId,"状态", promiseResult2.status)
}

 createUserThenDeleteIt(1024)

 createUserThenDeleteIt(9090)
